package net.starwifi.duobao.service;

import net.starwifi.duobao.entity.*;

import javax.servlet.http.HttpServletRequest;

/**
 * Created by Administrator on 2015/11/19.
 */
public interface DBOrderService extends BaseService<DBOrder,Long>  {


    void updateOrderImage(Long productId,String imageUrl);


    /** 订单生成，后台使用*/
    DBOrder build(DBProduct dbProduct,Member member, String sn, String timesNo, Integer num,String ip,String fromAddress);

    /** 订单生成 */
    DBOrder build(DBProduct dbProduct,String sn,String timesNo,Integer num,String ip,String fromAddress,String paymentPluginId);

    /** 订单支付 */
    void payment(final DBOrder order, Payment payment);


     /* 订单退款 */
     void refunds(DBOrder order, Refunds refunds);

    
    DBOrder findBySn(String sn);

    void autoOrderCodeInfo();

    public void clearException(DBTimes dbTimes);

    public void batchRefunds(HttpServletRequest request);

    public void refundsTr(DBOrder data,HttpServletRequest request);

}
